package com.king.designpatterns.设计模式对比.行为模式对比.策略模式;

/**
 * 环境角色
 *
 * @author king
 * @date 2021-06-17 22:57
 */
public class Context {
    /**
     * 指向抽象算法
     */
    private Algorithm al;

    public Context(Algorithm al) {
        this.al = al;
    }

    public boolean compress(String source, String to){
        return al.compress(source, to);
    }

    public boolean uncompress(String source, String to){
        return al.uncompress(source, to);
    }
}
